;;;;;;;;;;;;;;window numbering init
(window-numbering-mode)




;;;;;;;;;;;;;;split window
(defun split_window_horizontally (number)
  (let ((index 0))
    (while (< index number)
      (split-window-horizontally)
      (setq index (1+ index)))))

(defun split_window_vertically (number)
  (let ((index 0))
    (while (< index number)
      (split-window-vertically)
      (setq index (1+ index)))))




(defun split_window_to_nine()
  (interactive)
  (let ((index 0))
    (split_window_horizontally 2)
    (while (< index 3)
      (split_window_vertically 2)
      (other-window 3)
      (setq index (1+ index)))
    (balance-windows)))


(defun split_window_to_four()
  (interactive)
  (let ((index 0))
    (split_window_horizontally 1)
    (while (< index 2)
      (split_window_vertically 1)
      (other-window 2)
      (setq index (1+ index)))
    (balance-windows)))


(defun split_window_to_six()
  (interactive)
  (let ((index 0))
    (split_window_horizontally 2)
    (while (< index 2)
      (split_window_vertically 1)
      (other-window 2)
      (setq index (1+ index)))
    (balance-windows)))




(evil-leader/set-key
    "dow" 'delete-other-windows)


(evil-leader/set-key
	"1" 'select-window-1
	"2" 'select-window-2
	"3" 'select-window-3
	"4" 'select-window-4
	"5" 'select-window-5
	"6" 'select-window-6
	"7" 'select-window-7
	"8" 'select-window-8
	"9" 'select-window-9)






(add-hook 'after-init-hook
	  'split_window_to_four)

(provide 'window)
